<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: jiangjingbo
  Date: 2022/5/27
  Time: 15:05
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>查看所有</title>
    <style>
        table{
            border: 1px solid lightblue;
            width: 1000px;
            margin: 10px auto;
            text-align: center;
            border-collapse: collapse;
        }
        tr{
            border: 1px solid lightblue;
            height:50px;
            text-align: center;
        }
        td,th{
            border: 1px solid lightblue;
        }
        h2{
            text-align:center;
        }
    </style>
</head>

<body>
<h2>~~欢迎[${name}]进入~</h2>
<c:forEach items="${list}" var="list">
    <table>
        <tr>
            <td>编号</td>
            <td>姓名</td>
            <td>出生日期</td>
            <td>性别</td>
            <td>职业</td>
            <td>地区</td>
            <td>电话</td>
            <td>头像</td>
            <td colspan="4">操作</td>
        </tr>
        <tr>
            <td>${list.id}</td>
            <td>${list.name}</td>
            <td>${list.birthday}</td>
            <td>${list.gender}</td>
            <td>${list.career}</td>
            <td>${list.address}</td>
            <td>${list.mobile}</td>
            <td>${list.picture}</td>
            <td><a href="allone?method=allone&id=${list.id}">明细</a></td>
            <td><a href="addrecord.jsp">添加</a></td>
            <td><a href="update.jsp?id=${list.id}">修改</a></td>
            <td><a href="delete?method=deleteOne&id=${list.id}">删除</a></td>
        </tr>
    </table>
</c:forEach>
<tr>
    <td colspan="12">
        <a href="selectAll?method=selectAll&pageIndex=1">首页</a>
        <c:if test="${page.pageIndex>1}">
            <a href="selectAll?method=selectAll&pageIndex=${page.pageIndex-1}">上一页</a>
        </c:if>
        <c:if test="${page.pageIndex < page.totalPages}">
            <a href="selectAll?method=selectAll&pageIndex=${page.pageIndex+1}">下一页</a>
        </c:if>
        <a href="selectAll?method=selectAll&pageIndex=${page.totalPages}">最后</a>
    </td>
</tr>
</body>
</html>
